Termination Proof Script
Consider the TRS R consisting of the rewrite rules
|
1: |
|
x + 0 |
→ x |
2: |
|
0 + x |
→ x |
3: |
|
s(x) + s(y) |
→ s(s(x + y)) |
4: |
|
(x + y) + z |
→ x + (y + z) |
5: |
|
x * 0 |
→ 0 |
6: |
|
0 * x |
→ 0 |
7: |
|
s(x) * s(y) |
→ s((x * y) + (x + y)) |
8: |
|
(x * y) * z |
→ x * (y * z) |
9: |
|
app(nil,l) |
→ l |
10: |
|
app(cons(x,l1),l2) |
→ cons(x,app(l1,l2)) |
11: |
|
sum(nil) |
→ 0 |
12: |
|
sum(cons(x,l)) |
→ x + sum(l) |
13: |
|
sum(app(l1,l2)) |
→ sum(l1) + sum(l2) |
14: |
|
prod(nil) |
→ s(0) |
15: |
|
prod(cons(x,l)) |
→ x * prod(l) |
16: |
|
prod(app(l1,l2)) |
→ prod(l1) * prod(l2) |
|
There are 19 dependency pairs:
|
17: |
|
s(x) +# s(y) |
→ x +# y |
18: |
|
(x + y) +# z |
→ x +# (y + z) |
19: |
|
(x + y) +# z |
→ y +# z |
20: |
|
s(x) *# s(y) |
→ (x * y) +# (x + y) |
21: |
|
s(x) *# s(y) |
→ x *# y |
22: |
|
s(x) *# s(y) |
→ x +# y |
23: |
|
(x * y) *# z |
→ x *# (y * z) |
24: |
|
(x * y) *# z |
→ y *# z |
25: |
|
APP(cons(x,l1),l2) |
→ APP(l1,l2) |
26: |
|
SUM(cons(x,l)) |
→ x +# sum(l) |
27: |
|
SUM(cons(x,l)) |
→ SUM(l) |
28: |
|
SUM(app(l1,l2)) |
→ sum(l1) +# sum(l2) |
29: |
|
SUM(app(l1,l2)) |
→ SUM(l1) |
30: |
|
SUM(app(l1,l2)) |
→ SUM(l2) |
31: |
|
PROD(cons(x,l)) |
→ x *# prod(l) |
32: |
|
PROD(cons(x,l)) |
→ PROD(l) |
33: |
|
PROD(app(l1,l2)) |
→ prod(l1) *# prod(l2) |
34: |
|
PROD(app(l1,l2)) |
→ PROD(l1) |
35: |
|
PROD(app(l1,l2)) |
→ PROD(l2) |
|
The approximated dependency graph contains 5 SCCs:
{17-19},
{21,23,24},
{25},
{32,34,35}
and {27,29,30}.
-
Consider the SCC {17-19}.
The usable rules are {1-4}.
By taking the AF π with
π(+#) = π(s) = 1 together with
the lexicographic path order with
empty precedence,
the rules in {3,17}
are weakly decreasing and
the rules in {1,2,4,18,19}
are strictly decreasing.
There is one new SCC.
-
Consider the SCC {17}.
There are no usable rules.
By taking the AF π with
π(+#) = 1 together with
the lexicographic path order with
empty precedence,
rule 17
is strictly decreasing.
-
Consider the SCC {21,23,24}.
The usable rules are {1-8}.
By taking the AF π with
π(*#) = 1 together with
the lexicographic path order with
precedence * ≻ + ≻ s,
the rules in {1-8,21,23,24}
are strictly decreasing.
-
Consider the SCC {25}.
There are no usable rules.
By taking the AF π with
π(APP) = 1
and π(cons) = [2] together with
the lexicographic path order with
empty precedence,
rule 25
is strictly decreasing.
-
Consider the SCC {32,34,35}.
There are no usable rules.
By taking the AF π with
π(PROD) = 1
and π(cons) = 2 together with
the lexicographic path order with
empty precedence,
rule 32
is weakly decreasing and
the rules in {34,35}
are strictly decreasing.
There is one new SCC.
-
Consider the SCC {32}.
By taking the AF π with
π(PROD) = 1
and π(cons) = [2] together with
the lexicographic path order with
empty precedence,
rule 32
is strictly decreasing.
-
Consider the SCC {27,29,30}.
There are no usable rules.
By taking the AF π with
π(SUM) = 1
and π(cons) = 2 together with
the lexicographic path order with
empty precedence,
rule 27
is weakly decreasing and
the rules in {29,30}
are strictly decreasing.
There is one new SCC.
-
Consider the SCC {27}.
By taking the AF π with
π(SUM) = 1
and π(cons) = [2] together with
the lexicographic path order with
empty precedence,
rule 27
is strictly decreasing.
Hence the TRS is terminating.
Tyrolean Termination Tool (0.04 seconds)
--- May 4, 2006